package com.案例.复制文件到本模块中;

import lombok.SneakyThrows;

import java.io.FileInputStream;
import java.io.FileOutputStream;

public class Demo {
    @SneakyThrows
    public static void main(String[] args) {
        //创建本模块的写入文件 有好多个 用hello.txt
        FileOutputStream fileOutputStream = new FileOutputStream("hello.txt");
        //读取文件
        FileInputStream fileInputStream = new FileInputStream("C:\\Users\\lsc1999\\Desktop\\jdbc.properties");
        int bytes;
        while ((bytes=fileInputStream.read())!=-1){
            fileOutputStream.write(bytes);//吧读的文件写入到本模块的文件中
        }
    }
}
